<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="res/css/amazeui.min.css">
    <link rel="stylesheet" href="res/css/admin.css">
<!--    <script type="text/javascript" th:src="@{js/jquery-3.4.1.min.js}"></script>-->
    <script type="text/javascript" th:src="@{/js/jquery-1.11.3.min.js}"></script>
    <style>
        .admin-main{
            padding-top: 0px;
        }
    </style>
</head>
<body>
<div class="am-cf admin-main">
    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-g">
                <div class="am-form am-form-horizontal"
                     style="padding-top:10px;">
                    <div class="am-form-group">
                        <span style="margin: 0px 0px 0px 110px">是否确认删除?</span>
                    </div>
                    <div class="am-form-group" style="margin: 0px 100px 0px 0px">
                        <div class="am-u-sm-9 am-u-sm-push-3" style="margin: 0px 0px 0px 26px">
                            <input type="button" class="am-btn am-btn-primary" value="确认" id="confirm"/>
                            <input type="button" class="am-btn am-btn-primary" value="取消" id="cancel"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="myplugs/js/plugs.js">
</script>
</body>

<script>
    function GetRequest() {
        var url = location.search; //获取url中"?"符后的字串
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            for(var i = 0; i < strs.length; i ++) {
                theRequest[strs[i].split("=")[0]]=decodeURIComponent(strs[i].split("=")[1]);
            }
        }
        return theRequest;
    }

    $(function(){
        var Request = new Object();
        Request = GetRequest();
        var id = Request["id"];

        $("#confirm").click(function(){
            $.ajax({
                type:"post",
                url:"/menu/deteleMenu",
                dataType:"text",
                data:{id:id},
                success:function(result){
                    alert(result);
                    parent.location.reload();
                },
                error:function(result){
                    alert(result);
                }
            })
        })

        $("#cancel").click(function(){
            parent.location.reload();
        })

    })

</script>
</html>